package net.monkeybros.sbus.model;

import com.neurospeech.wsclient.*;
import org.w3c.dom.*;

public class LineStatusInfo extends WSObject
{
	
	private Integer _activos;
	public Integer getactivos(){
		return _activos;
	}
	public void setactivos(Integer value){
		_activos = value;
	}
	private Integer _localizados;
	public Integer getlocalizados(){
		return _localizados;
	}
	public void setlocalizados(Integer value){
		_localizados = value;
	}
	private Integer _desf;
	public Integer getdesf(){
		return _desf;
	}
	public void setdesf(Integer value){
		_desf = value;
	}
	private Integer _desf_abs;
	public Integer getdesf_abs(){
		return _desf_abs;
	}
	public void setdesf_abs(Integer value){
		_desf_abs = value;
	}
	private Integer _desf_bien;
	public Integer getdesf_bien(){
		return _desf_bien;
	}
	public void setdesf_bien(Integer value){
		_desf_bien = value;
	}
	private Integer _desf_regular;
	public Integer getdesf_regular(){
		return _desf_regular;
	}
	public void setdesf_regular(Integer value){
		_desf_regular = value;
	}
	private Integer _desf_adel;
	public Integer getdesf_adel(){
		return _desf_adel;
	}
	public void setdesf_adel(Integer value){
		_desf_adel = value;
	}
	private Integer _desf_retr;
	public Integer getdesf_retr(){
		return _desf_retr;
	}
	public void setdesf_retr(Integer value){
		_desf_retr = value;
	}
	private Integer _frec;
	public Integer getfrec(){
		return _frec;
	}
	public void setfrec(Integer value){
		_frec = value;
	}
	private Integer _frec_desf;
	public Integer getfrec_desf(){
		return _frec_desf;
	}
	public void setfrec_desf(Integer value){
		_frec_desf = value;
	}
	private Integer _frec_bien;
	public Integer getfrec_bien(){
		return _frec_bien;
	}
	public void setfrec_bien(Integer value){
		_frec_bien = value;
	}
	private Integer _frec_regular;
	public Integer getfrec_regular(){
		return _frec_regular;
	}
	public void setfrec_regular(Integer value){
		_frec_regular = value;
	}
	private Integer _frec_adel;
	public Integer getfrec_adel(){
		return _frec_adel;
	}
	public void setfrec_adel(Integer value){
		_frec_adel = value;
	}
	private Integer _frec_retr;
	public Integer getfrec_retr(){
		return _frec_retr;
	}
	public void setfrec_retr(Integer value){
		_frec_retr = value;
	}
	private Integer _graves;
	public Integer getgraves(){
		return _graves;
	}
	public void setgraves(Integer value){
		_graves = value;
	}
	private String _linea;
	public String getlinea(){
		return _linea;
	}
	public void setlinea(String value){
		_linea = value;
	}
	
	public static LineStatusInfo loadFrom(Element root) throws Exception
	{
		if(root==null){
			return null;
		}
		LineStatusInfo result = new LineStatusInfo();
		result.load(root);
		return result;
	}
	
	
	protected void load(Element root) throws Exception
	{
		this.setactivos(WSHelper.getInteger(root,"activos",false));
		this.setlocalizados(WSHelper.getInteger(root,"localizados",false));
		this.setdesf(WSHelper.getInteger(root,"desf",false));
		this.setdesf_abs(WSHelper.getInteger(root,"desf_abs",false));
		this.setdesf_bien(WSHelper.getInteger(root,"desf_bien",false));
		this.setdesf_regular(WSHelper.getInteger(root,"desf_regular",false));
		this.setdesf_adel(WSHelper.getInteger(root,"desf_adel",false));
		this.setdesf_retr(WSHelper.getInteger(root,"desf_retr",false));
		this.setfrec(WSHelper.getInteger(root,"frec",false));
		this.setfrec_desf(WSHelper.getInteger(root,"frec_desf",false));
		this.setfrec_bien(WSHelper.getInteger(root,"frec_bien",false));
		this.setfrec_regular(WSHelper.getInteger(root,"frec_regular",false));
		this.setfrec_adel(WSHelper.getInteger(root,"frec_adel",false));
		this.setfrec_retr(WSHelper.getInteger(root,"frec_retr",false));
		this.setgraves(WSHelper.getInteger(root,"graves",false));
		this.setlinea(WSHelper.getString(root,"linea",false));
	}
	
	
	
	public Element toXMLElement(Element root)
	{
		Element e = root.getOwnerDocument().createElement("LineStatusInfo");
		fillXML(e);
		return e;
	}
	
	public void fillXML(Element e)
	{
		WSHelper.addChild(e,"activos",String.valueOf(_activos),false);
		WSHelper.addChild(e,"localizados",String.valueOf(_localizados),false);
		WSHelper.addChild(e,"desf",String.valueOf(_desf),false);
		WSHelper.addChild(e,"desf_abs",String.valueOf(_desf_abs),false);
		WSHelper.addChild(e,"desf_bien",String.valueOf(_desf_bien),false);
		WSHelper.addChild(e,"desf_regular",String.valueOf(_desf_regular),false);
		WSHelper.addChild(e,"desf_adel",String.valueOf(_desf_adel),false);
		WSHelper.addChild(e,"desf_retr",String.valueOf(_desf_retr),false);
		WSHelper.addChild(e,"frec",String.valueOf(_frec),false);
		WSHelper.addChild(e,"frec_desf",String.valueOf(_frec_desf),false);
		WSHelper.addChild(e,"frec_bien",String.valueOf(_frec_bien),false);
		WSHelper.addChild(e,"frec_regular",String.valueOf(_frec_regular),false);
		WSHelper.addChild(e,"frec_adel",String.valueOf(_frec_adel),false);
		WSHelper.addChild(e,"frec_retr",String.valueOf(_frec_retr),false);
		WSHelper.addChild(e,"graves",String.valueOf(_graves),false);
		if(_linea!=null)
			WSHelper.addChild(e,"linea",String.valueOf(_linea),false);
	}
	
}
